package gold.digger;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC537 {
    public long startExecuteTime = System.currentTimeMillis();


    public class Solution {

        public String complexNumberMultiply(String a, String b) {
            String x[] = a.split("\\+|i");
            String y[] = b.split("\\+|i");
            int a_real = Integer.parseInt(x[0]);
            int a_img = Integer.parseInt(x[1]);
            int b_real = Integer.parseInt(y[0]);
            int b_img = Integer.parseInt(y[1]);
            return (a_real * b_real - a_img * b_img) + "+" + (a_real * b_img + a_img * b_real) + "i";

        }
    }


    public void run() {
        Solution solution = new Solution();
        List<Integer> list = new ArrayList<>();
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC537 an = new LC537();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
